package com.bvgol.examples.my.lambda.forkjoin;/**
 * @Classname TTT
 * @Description TODO
 * @Date 2021/3/11 11:11
 * @Created by GUOCHEN
 */

import com.alibaba.fastjson.JSONObject;
import io.micrometer.core.instrument.util.StringUtils;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: my-spring-completely
 * @description:
 * @author: GUOCHEN
 * @create: 2021/03/11 11:11
 */
public class TTT {
    @Test
    public void name() {
        JSONObject jsonMain = new JSONObject();
        jsonMain.put("111", "jsonMain");
        jsonMain.put("112", "jsonMain");
        jsonMain.put("113", "jsonMain");
        JSONObject ocrOriginal = new JSONObject();
        ocrOriginal.put("111", "ocrOriginal");
        ocrOriginal.put("112", "ocrOriginal");
        ocrOriginal.put("113", "ocrOriginal");
        JSONObject ocrAfter = new JSONObject();
        ocrAfter.put("111", "ocrAfter");
        ocrAfter.put("112", "ocrAfter");
        ocrAfter.put("113", "ocrAfter");

        for (String str : jsonMain.keySet()) {
            Map<String, Object> m = new HashMap<>(2);
            m.put("old", StringUtils.isNotBlank(ocrOriginal.getString(str)) ? ocrOriginal.getString(str) : "");
            m.put("new", StringUtils.isNotBlank(ocrAfter.getString(str)) ? ocrAfter.getString(str) : "");
//			main.add(m);
            System.out.println(m);
        }
    }
}
